<template>
    <view>
      <up-sticky bg-color="#fff" custom-nav-height="91">
      </up-sticky>
      <custom-navbar title="感兴趣职位" :autoBack="true" leftIconColor="#303133" />
      <up-gap height="30rpx" />
      <JobList :job-list="res" />
    </view>
  </template>

  <script setup lang="ts">
  import JobList from '@/pages/components/jobList/index.vue';
  import { commonJobInteractionList } from '@/api/user/common';
  // import home06 from '@/static/images/tab/home-06.png';
  // import home10 from '@/static/images/tab/home-10.png';
  const home06 = 'https://yiliao.test03.qcw800.com/static/images/tab/home-06.png'
  const home10 = 'https://yiliao.test03.qcw800.com/static/images/tab/home-10.png'

  onMounted(async () => {
    await nextTick(); // Ensure DOM is updated
    const query = uni.createSelectorQuery().in(this);
    query.select('.u-navbar').boundingClientRect((rect) => {
      //console.log('Element height:', rect.height);
    }).exec();
  });

  const res:any = reactive([]);
  async function getJobInterationList() {
    let params = {
      like: 1
    }
    let result = await commonJobInteractionList(params, '感兴趣职位');
    if (!result) {
      uni.showToast({title: '获取职位互动失败', icon: 'none'})
      return
    }
    //赋值
    result.forEach(item => {
      res.push(item)
    })
  }

  onLoad(() => {
      getJobInterationList();
  });
  </script>

  <style lang="scss" scoped>
    .tab-bar{
      height: 102rpx;
      background: #fff;
    }
  </style>
